package cn.yuanqiao.archive.yuguidang.mapper;/**
 * @author 赵常飞
 * @date 2023/9/26 14:25
 */

import cn.yuanqiao.archive.yuguidang.domain.YuguidangArchiveForm;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 *
 *@AUTHOR:赵常飞
 *@date 2023/9/26 14:25
 */
public interface yuguidangMapper {

    int checkArchiveIsAddForm(List<YuguidangArchiveForm> yuguidangArchiveForms);

    int createTable(String tableName);

    int checkArchiveUserCategoryForm(List<YuguidangArchiveForm> yuguidangArchiveForms);

    int batchInsertYqdaArchiveForm(List<YuguidangArchiveForm> yuguidangArchiveForms);

    void updateArchiveBySaveFormArchiveId(String sql);

    YuguidangArchiveForm selectYqdaArchiveFormByFormId(@Param("tableName") String tableName, @Param("formId") Long formId);

    List<Map<String, Object>> selectYqdaArchiveList(String sql);

    int updateYqdaArchiveForm(YuguidangArchiveForm yuguidangArchiveForm);

    List<YuguidangArchiveForm> selectYqdaArchiveFormsByArchiveIds(@Param("archiveIds") String[] archiveIds, @Param("userId") Long userId, @Param("tableName") String tableName);

    int deleteYqdaArchiveFormByArchiveIdsAndUserId(@Param("archiveIds")String[] archiveIds, @Param("userId") Long userId, @Param("tableName") String tableName);

    List<YuguidangArchiveForm> selectYqdaArchiveFormList(YuguidangArchiveForm yuguidangArchiveForm);

    int batchUpdateByArchiveIds(YuguidangArchiveForm yuguidangArchiveForm);

    int tuihui(@Param("tableName")String tableName, @Param("pk") String pk, @Param("fileTableName") String fileTableName, @Param("idsql") String idsql);
}
